package com.waves.design.facade;

/**
 * 外观类
 */
public class EncryptFacade {
    private CipherMachine cipherMachine;
    private FileReader reader;
    private FileWriter writer;

    public EncryptFacade() {
        cipherMachine = new CipherMachine();
        reader = new FileReader();
        writer = new FileWriter();
    }

    public void fileEncrypt(String fileNameSrc,String fileNameDes){
        String read = reader.read(fileNameSrc);
        String encrypt = cipherMachine.encrypt(read);
        writer.write(encrypt,fileNameDes);
    }
}
